#! /usr/bin/octave -qf
1;

x = [0.5:0.001:1.5];
y = zeros(1,columns(x));
for i = 1 : columns(x)
    y(i) = 1/(x(i)^2);
endfor

x1 = [0.5:0.01:1.5];
y1 = zeros(1,columns(x1));
for i = 1 : columns(x1)
    y1(i) = 1/(x1(i)^2) + 0.1;
endfor


x2 = [0.5:0.01:1.5];
y2 = zeros(1,columns(x2));
for i = 1 : columns(x2)
    y2(i) = 1/(x2(i)^2) + 0.3;
endfor


__gnuplot_set__ term gif;
__gnuplot_set__ output 'fronts1.gif';

__gnuplot_set__ xlabel "objetivo 1";
__gnuplot_set__ ylabel "objetivo 2";

plot(x,y, ";frente real;", x1 , y1, "*3;algortimo 1;", x2 , y2, "*6;algortimo 2;");




x1 = [0.5:0.02:1.5];
y1 = zeros(1,columns(x1));
for i = 1 : columns(x1)
    y1(i) = 1/(x1(i)^3) +x1(i) + 0.3;
endfor


x2 = [0.5:0.03:1.5];
y2 = zeros(1,columns(x2));
for i = 1 : columns(x2)
    y2(i) = 1/(x2(i)^4) + 0.4;
endfor


__gnuplot_set__ term gif;
__gnuplot_set__ output 'fronts2.gif';

__gnuplot_set__ xlabel "objetivo 1";
__gnuplot_set__ ylabel "objetivo 2";

plot(x,y, ";frente real;", x1 , y1, "*3;algortimo 1;", x2 , y2, "*6;algortimo 2;");

